// components/song-item-v1/index.js
import {store} from "../../store/index"
Component({
    
    /**
     * 组件的属性列表
     */
    properties: {
         item:{
             type:Object,
             value:{}
         }
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        handleClick(){
            //console.log(this.data.item)
            wx.navigateTo({
              url: "../../pages/music-player/index?id="+this.data.item.id,
            })
           //store.dispatch("getSongDetailAction",this.data.item.id)
           store.dispatch("playMusicWithSongIdAction", { id:this.data.item.id })
        }
    }
})
